<?php



function start_soap($url_wsdl){
	return new SoapClient($url_wsdl);
}




function writelog($file, $log) {
	$logdir = '../logs/';
	$logfile = $logdir.date("Y-m-d").'_'.$file.'.php';
	if($fp = @fopen($logfile, 'a')) {
		@flock($fp, 2);
		$log = is_array($log) ? $log : array($log);
		foreach($log as $tmp) {
			fwrite($fp, "<?PHP exit;?>\t".str_replace(array('<?', '?>'), '', $tmp)."\n");
		}
		fclose($fp);
	}
}

function get_ordersn(){
	global $order_pre;
	return $order_pre."200120";
}

?>